using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Tilemaps;

// 输出一些地图信息

public class Map : MonoBehaviour
{
    public Tilemap map;
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("cellBounds "+ map.cellBounds);
        Debug.Log("地图起始x坐标 "+ map.cellBounds.x);
        Debug.Log("地图起始y坐标 "+ map.cellBounds.y);
        Debug.Log("地图长度,x轴 "+ map.cellBounds.size.x);
        Debug.Log("地图宽度,y轴 "+ map.cellBounds.size.y);

        // map.SetColor(new Vector3Int(5,5,0),Color.red);
        // map.DeleteCells(new Vector3Int(1,1,0), new Vector3Int(3,3,0));
        if(map.HasTile(new Vector3Int(0,9,0))){
            Debug.Log("has tile 0 9");
        }
        if(map.HasTile(new Vector3Int(-3,-3,0))){
            Debug.Log("has tile -3 -3");
        }
    }

    // Update is called once per frame
    void Update()
    {
    }

    void outputMap(){

    }
}
